#pragma once
#include <Rz/IObject.h>
#include <Rz/String.h>

#define RZ_APPLICATION(appClass)						\
	int _cdecl main(int argc, char* argv[])				\
	{													\
		::Rz::String::Collection args;					\
		::Rz::IApplication* app = new appClass;			\
														\
		for (int i = 0; i < argc; ++i)					\
		{												\
			args.Add(argv[i]);							\
		}												\
														\
		return static_cast<int>(app->Run(args));		\
	}


namespace Rz {

class IApplication :
	virtual public IObject
{
	public:
		RZ_RTTI_INTERFACE(Rz, IApplication);
		RZ_RTTI_IMPLEMENTS(IObject);
		RZ_RTTI_END;

		typedef s32	StatusValue;

		virtual StatusValue Run(String::Collection& args) = 0;
};

}
